package com.yc.navy.springmvc.dto;

import java.io.Serializable;
import java.util.List;

import com.yc.navy.springmvc.bean.OrderItemInfo;
import com.yc.navy.springmvc.util.StringUtil;

public class OrderDetailDTO implements Serializable{
	private String ono;
	private String odate;
	private String totalPrice;
	private Integer status = 1;
	private List<OrderItemInfo> items;
	@Override
	public String toString() {
		return "OrderDetailDTO [ono=" + ono + ", odate=" + odate + ", totalPrice=" + totalPrice + ", status=" + status
				+ ", items=" + items + "]";
	}
	public OrderDetailDTO(String ono, String odate, String totalPrice, Integer status, List<OrderItemInfo> items) {
		super();
		this.ono = ono;
		this.odate = odate;
		this.totalPrice = totalPrice;
		this.status = status;
		this.items = items;
	}
	public OrderDetailDTO() {
		super();
	}
	public String getOno() {
		return ono;
	}
	public void setOno(String ono) {
		this.ono = ono;
	}
	public String getOdate() {
		return odate;
	}
	public void setOdate(String odate) {
		this.odate = odate;
	}
	public String getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(String totalPrice) {
		this.totalPrice = totalPrice;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public List<OrderItemInfo> getItems() {
		return items;
	}
	public void setItems(List<OrderItemInfo> items) {
		this.items = items;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((items == null) ? 0 : items.hashCode());
		result = prime * result + ((odate == null) ? 0 : odate.hashCode());
		result = prime * result + ((ono == null) ? 0 : ono.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + ((totalPrice == null) ? 0 : totalPrice.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OrderDetailDTO other = (OrderDetailDTO) obj;
		if (items == null) {
			if (other.items != null)
				return false;
		} else if (!items.equals(other.items))
			return false;
		if (odate == null) {
			if (other.odate != null)
				return false;
		} else if (!odate.equals(other.odate))
			return false;
		if (ono == null) {
			if (other.ono != null)
				return false;
		} else if (!ono.equals(other.ono))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (totalPrice == null) {
			if (other.totalPrice != null)
				return false;
		} else if (!totalPrice.equals(other.totalPrice))
			return false;
		return true;
	}
	
	
}
